﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Runtime.InteropServices;

namespace ZhimeiSoft.Framework.Client.Control.DateTimeGrid
{
    public partial class DayDateTimeForHourTitles : UserControl
    {
        private ArrayList arrDayDateTime = new ArrayList();
        
        public DayDateTimeForHourTitles()
        {
            InitializeComponent();
            arrDayDateTime.Add(dayDateTimeForHoursTitle1);
        }

        public void addHourColumn(string timeHourTitle)
        {
            DayDateTimeForHoursTitle dtTime = new DayDateTimeForHoursTitle();
            dtTime.Name = string.Concat("dayDateTimeForHoursTitle", arrDayDateTime.Count + 1);
            arrDayDateTime.Add(dtTime);

            dtTime.Height = dayDateTimeForHoursTitle1.Height;
            dtTime.Width = 134/2;
            dtTime.showTimeTitle(timeHourTitle);
            dtTime.showTime(false);
            Point pt = new Point(134 / 2 * arrDayDateTime.Count + 1, 0);
            dtTime.Location = pt;
            panelTime.Controls.Add(dtTime);
            
        }
    }
}
